package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_audit_tab database table.
 * 
 */
@Entity
@Table(name="per_audit_tab")
@NamedQuery(name="PerAuditTab.findAll", query="SELECT p FROM PerAuditTab p")
public class PerAuditTab implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int tabid;

	private String tabname;

	//bi-directional many-to-one association to PerAuditMdy
	@OneToMany(mappedBy="perAuditTab")
	private List<PerAuditMdy> perAuditMdies;

	//bi-directional many-to-one association to PerAuditZd
	@OneToMany(mappedBy="perAuditTab")
	private List<PerAuditZd> perAuditZds;

	public PerAuditTab() {
	}

	public int getTabid() {
		return this.tabid;
	}

	public void setTabid(int tabid) {
		this.tabid = tabid;
	}

	public String getTabname() {
		return this.tabname;
	}

	public void setTabname(String tabname) {
		this.tabname = tabname;
	}

	public List<PerAuditMdy> getPerAuditMdies() {
		return this.perAuditMdies;
	}

	public void setPerAuditMdies(List<PerAuditMdy> perAuditMdies) {
		this.perAuditMdies = perAuditMdies;
	}

	public PerAuditMdy addPerAuditMdy(PerAuditMdy perAuditMdy) {
		getPerAuditMdies().add(perAuditMdy);
		perAuditMdy.setPerAuditTab(this);

		return perAuditMdy;
	}

	public PerAuditMdy removePerAuditMdy(PerAuditMdy perAuditMdy) {
		getPerAuditMdies().remove(perAuditMdy);
		perAuditMdy.setPerAuditTab(null);

		return perAuditMdy;
	}

	public List<PerAuditZd> getPerAuditZds() {
		return this.perAuditZds;
	}

	public void setPerAuditZds(List<PerAuditZd> perAuditZds) {
		this.perAuditZds = perAuditZds;
	}

	public PerAuditZd addPerAuditZd(PerAuditZd perAuditZd) {
		getPerAuditZds().add(perAuditZd);
		perAuditZd.setPerAuditTab(this);

		return perAuditZd;
	}

	public PerAuditZd removePerAuditZd(PerAuditZd perAuditZd) {
		getPerAuditZds().remove(perAuditZd);
		perAuditZd.setPerAuditTab(null);

		return perAuditZd;
	}

}